

#pragma once

#include "zdbmain.h"

#pragma pack(push, 8)

#pragma warning( disable: 4275 4251 )

#ifdef SCENEDLLIMPEXP
#undef SCENEDLLIMPEXP
#endif
#ifdef SCENEOE
#define SCENEDLLIMPEXP __declspec( dllexport )
#else
#define SCENEDLLIMPEXP
#endif

const ZTCHAR UCDB_NAMEDPATH_DICTIONARY[]  = UCRX_T("ACAD_NAMEDPATH");

Ucad::ErrorStatus SCENEDLLIMPEXP ucdbGetNamedPathDictionary   (UcDbDatabase* pDb, UcDbDictionary*& pDict,
                                                            UcDb::OpenMode mode, bool createIfNonExist);
Ucad::ErrorStatus SCENEDLLIMPEXP ucdbGetNamedPathDictionary   (UcDbDatabase* pDb, UcDbDictionary*& pDict,
                                                            UcDb::OpenMode mode);

class UcDbImpNamedPath;

class SCENEDLLIMPEXP UcDbNamedPath : public UcDbObject
{
public:
    UCRX_DECLARE_MEMBERS(UcDbNamedPath);
    virtual ~UcDbNamedPath();

    virtual Ucad::ErrorStatus   getGeometry(UcGeCurve3d *& pCurveGeometry) const = 0;

protected:
    UcDbNamedPath (UcDbImpNamedPath* pImp);
    UcDbImpNamedPath* imp() const;

private:
    friend class UcDbImpNamedPath;
    UcDbImpNamedPath* mpImp;
};

class SCENEDLLIMPEXP UcDbCurvePath : public UcDbNamedPath
{
public:
    UCRX_DECLARE_MEMBERS(UcDbCurvePath);
    UcDbCurvePath();
    virtual ~UcDbCurvePath();

    virtual Ucad::ErrorStatus   getGeometry(UcGeCurve3d *& pCurveGeometry) const;

    Ucad::ErrorStatus   setGeometry(const UcDbObjectId& id);
    UcDbObjectId        entityId() const;
    virtual Ucad::ErrorStatus dwgInFields  (UcDbDwgFiler* pFiler);
    virtual Ucad::ErrorStatus dwgOutFields (UcDbDwgFiler* pFiler) const;
    virtual Ucad::ErrorStatus dxfInFields  (UcDbDxfFiler* pFiler);
    virtual Ucad::ErrorStatus dxfOutFields (UcDbDxfFiler* pFiler) const;
    virtual ZSoft::UInt32  setAttributes (UcGiDrawableTraits* pTraits);

private:
    friend class UcDbImpCurvePath;

};

class SCENEDLLIMPEXP UcDbPointPath : public UcDbNamedPath
{
public:
    UCRX_DECLARE_MEMBERS(UcDbPointPath);
    UcDbPointPath();
    virtual ~UcDbPointPath();

    virtual Ucad::ErrorStatus   getGeometry(UcGeCurve3d *& pCurveGeometry) const;

    Ucad::ErrorStatus   setGeometry(const UcGePoint3d& pt);
    virtual Ucad::ErrorStatus dwgInFields  (UcDbDwgFiler* pFiler);
    virtual Ucad::ErrorStatus dwgOutFields (UcDbDwgFiler* pFiler) const;
    virtual Ucad::ErrorStatus dxfInFields  (UcDbDxfFiler* pFiler);
    virtual Ucad::ErrorStatus dxfOutFields (UcDbDxfFiler* pFiler) const;
    virtual ZSoft::UInt32  setAttributes (UcGiDrawableTraits* pTraits);

private:
#ifdef _ZSOFT_WINDOWS_
	friend class UcDbPointPath;
#endif
};

